/**
 * 
 */
package com.zufangbao.earth.service;

import java.util.List;

import com.demo2do.core.service.GenericService;
import com.zufangbao.earth.entity.security.Principal;
import com.zufangbao.sun.entity.company.corp.App;


/**
 * @author Downpour
 */
public interface PrincipalService extends GenericService<Principal>{
	
	/**
	 * Get principal by name
	 * 
	 * @param name
	 * @return
	 */
	public Principal getPrincipal(String name);
	
	String updatePassword(Principal principal,String oldPassword, String newPassword);

	public List<Principal> getRoleListByApp(App operation_app);

	public void save(Principal newPrincipal);

	public List<App> get_can_access_app_list(Principal principal);
}
